package com.d3works.apps.base.service;

import com.d3works.apps.base.db.Partner;
import com.d3works.apps.base.db.PartnerPriceList;
import com.d3works.apps.base.db.PriceList;
import com.d3works.exception.D3worksException;

public interface PartnerPriceListService {

  /**
   * Allows to check the dates in a price list.
   *
   * @param partnerPriceList
   * @throws D3worksException if two price lists are scheduled on the same time.
   */
  void checkDates(PartnerPriceList partnerPriceList) throws D3worksException;

  /**
   * @param partner
   * @param priceListTypeSelect
   * @return the default price list from the partner null if partner is null, or no price list was
   *     found for the given partner
   */
  PriceList getDefaultPriceList(Partner partner, int priceListTypeSelect);

  /**
   * @param partner
   * @param priceListTypeSelect
   * @return the domain for the partner and the type
   */
  String getPriceListDomain(Partner partner, int priceListTypeSelect);

  /**
   * @param partner
   * @param priceListTypeSelect
   * @return the partner price list for the given type
   */
  public PartnerPriceList getPartnerPriceList(Partner partner, int priceListTypeSelect);
}
